Method and apparatus for adaptive motor speed control

ABSTRACT

A different adaptive control method is used to control a motor during each of two or more phases of motor operation. Thus, in a first phase of motor operation the motor is controlled using a first adaptive control method, in a second phase of motor operation the motor is controlled using a second adaptive control method, and so forth. The motor can be controlled in this manner in any number of phases, in which the motor is used for any of a number of corresponding purposes. The method used in each phase can be optimized to suit that type of operation without compromising operation during other phases.

DESCRIPTION OF THE RELATED ART

Electronic devices such as computer printers commonly include smallmotors that need to be precisely controlled. For example, it isimportant that the motor that moves the printhead carriage in an inkjetprinter move at a precisely maintained constant speed across the paper.A similar requirement exists for the motor that advances the paper.Various methods have been used to control such motors. One such methodinvolves the proportional-integral-derivative (PID) algorithm.

PID is a well-known type of adaptive control algorithm that has longbeen used for controlling motors, heating and cooling processes, andmany other diverse applications. In the lexicon of adaptive control, thesystem being controlled is referred to generically as a “plant.”Generally speaking, the PID algorithm includes steps of measuring thedeviation or error between the current plant output value or presentvalue (e.g., motor speed) and the target plant output value or setpoint,calculating a proportional error term, calculating an error integralterm (i.e., the error over time), calculating an error derivative term,applying a separate gain factor to each term, and summing the results tocreate the final value. Finally, the result is fed back to the plant asan input or, in the lexicon of adaptive control, an excitation orstimulus. The PID algorithm works well for controlling systems in whichthe objective is to move the system toward a setpoint, such as aconstant motor speed.

One advantage of the PID algorithm over other adaptive controlalgorithms is its flexibility. The algorithm can be tuned to better suitit for a given application. For example, in a motor speed controller,the algorithm can be tuned to optimize steady-state performance, i.e.,to precisely maintain speed.

In some types of devices, the same motor may be operated in differentphases or be used for multiple purposes. For example, in an inkjetprinter, it is desirable for the motor to accelerate the printheadcarriage in what can be considered a first phase of motor operation sothat the carriage is moving at a target speed by the time it reaches thebeginning of the printable area of the page. The motor continues to movethe carriage across the page at the target speed in a second phase ofoperation, and then decelerates the carriage in a third phase ofoperation when it reaches the end of the printable area. It is desirablefor the printhead to accelerate to its target speed and decelerate fromits target speed as quickly as possible because the physical distancethe carriage can travel during the acceleration and deceleration phasesis limited by the overall width of the printer, which is optimally notvery much wider than a sheet of the paper to be printed. The PIDalgorithm can be tuned to optimize the steady-state or constant-speedphase, or it can be tuned to optimized the acceleration and decelerationphases, but it cannot readily be tuned to optimize all three phases ofoperation. For example, if the algorithm is tuned to optimize theconstant-speed phase, then during the acceleration phase it may causethe carriage to either overshoot the target constant speed or toapproach the constant speed in an overly conservative manner, neither ofwhich is optimal. If the algorithm is tuned to optimize the accelerationand deceleration phases, constant-speed performance may suffer.

The present invention addresses the above-described problems anddeficiencies and others in the manner described below.

SUMMARY OF THE INVENTION

The present invention relates to a method and system for controlling amotor using a different adaptive control method during each of aplurality of phases of operation. Thus, in a first phase of motoroperation the motor is controlled using a first adaptive control method,and in a second phase of motor operation the motor is controlled using asecond adaptive control method. The motor can be controlled in thismanner in any number of phases, in which the motor is used for any of anumber of corresponding purposes. For example, in an illustrativeembodiment of the invention there are three phases: an accelerationphase in which a first adaptive control method causes the motor toaccelerate toward a target speed, a constant-speed phase in which asecond adaptive control method causes the motor to maintain the targetspeed, and a deceleration phase in which an adaptive control methodcauses the motor to decelerate from the target speed. The adaptivecontrol method used in the deceleration phase can be the same as thatused in the acceleration phase or, alternatively in other embodiments ofthe invention, it can be still a third method.

The first, second, etc., adaptive control methods can be of any suitabletype known in the art. As in any conventional adaptive control method,the value being controlled, which is motor speed in the case of thepresent invention, is measured and fed back as an input to the method.Performing the method using motor speed as feedback yields a controlvalue. An excitation signal is applied to the motor that represents thecontrol value. For example, for motors of the type that operate at aspeed dependent upon the power applied to them, the signal will providean amount of power in the motor that represents the control value.Proportional-integral-derivative (PID) methods represent an example ofsuch an adaptive control method. Other adaptive control methods includethose that use look-up tables. Still others will occur to personsskilled in the art in view of the teachings herein (i.e., in this patentspecification).

In an exemplary look-up table-based adaptive control method, the tablerelates the control values to measured motor speed. In some suchembodiments of the invention, the method can use a different look-uptable for different phases of operation, while in other embodiments thesame table can be used for more than one phase of operation. The methodscan be performed by (and any look-up tables, data or other elements usedin the method can be stored in) suitable logic, such as a programmedmicroprocessor, microcontroller, or other integrated circuit or portionthereof.

The invention optimizes motor performance in each of several phases ofoperation without sacrificing performance in the other phases. By usinga different adaptive control method during each of a plurality of phasesof operation, each adaptive control method can be tuned or otherwiseoptimized to suit that phase of operation. For example, the method usedduring an acceleration phase can be optimized to accelerate the motor asquickly as possible to the target speed without overshooting it, whilethe method using during a constant-speed phase can be optimized tomaintain the motor at the target speed without compromising accelerationor deceleration phases.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram of an exemplary processor-basedmotor control system in accordance with one embodiment of the invention.

FIG. 2 is a flow diagram illustrating an exemplary method forcontrolling a motor during three phases of operation in the systemillustrated in FIG. 1.

FIG. 3 is a flow diagram illustrating an exemplary method forcontrolling a motor acceleration phase in the system illustrated in FIG.1.

FIG. 4 illustrates in generalized form an acceleration look-up table forthe method illustrated in the flow diagram of FIG. 2.

FIG. 5 is a flow diagram illustrating an exemplary method forcontrolling a motor constant-speed phase in the system illustrated inFIG. 1.

FIG. 6 is a flow diagram illustrating an exemplary method forcontrolling a motor deceleration phase in the system illustrated in FIG.1.

FIG. 7 illustrates in generalized form a deceleration look-up table forthe method illustrated in the flow diagram of FIG. 5.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

In the following description, like reference numerals indicate likecomponents to enhance the understanding of the invention through thedescription of the drawings. Also, although specific features,configurations, arrangements and steps are discussed below, it should beunderstood that such specificity is for illustrative purposes only. Aperson skilled in the relevant art will recognize that other features,configurations, arrangements and steps are useful without departing fromthe spirit and scope of the invention.

As illustrated in FIG. 1, a system based upon a microprocessor,microcontroller or similar processing device 10 controls a motor 12.Motor 12 can be of any suitable type in which motor speed can becontrolled by controlling the power, current or similar parameter of theinput signal applied to it. In the illustrated embodiment of theinvention, motor 12 is of a type that is commonly used in smallelectronic machines and devices, such as computer inkjet printers. Insuch embodiments, processing device 10 can be included in the processinglogic of an application-specific integrated circuit (ASIC) or othercircuitry that is used to control other aspects of the printer or otherdevice. Motor 12 can be powered through pulse-width modulation (PWM)logic 14 as is common in devices having motors of this type or throughany other suitable motor powering system known in the art.

Processing device 10 effects adaptive control methods or algorithms, asdescribed in further detail below. As in a conventionaladaptively-controlled motor system, a suitable encoder 18 reads thespeed of motor 12 as measured by a suitable sensor 16, such as anoptical encoder, and feeds back the motor speed value back to processingdevice 10. Processing device 10 provides the feedback to an adaptivecontrol method as an input, which generates a result or output inresponse. Processing device 10 provides this result or control value toPWM logic 14, which in turn provides an input signal to motor 12 inresponse. The control value indicates the power that PWM logic 14provides to motor 12. As persons skilled in the art to which theinvention relates can appreciate, these steps occur repetitively at asufficiently high rate such that processing device 10 effectivelyoutputs a stream of control values so as to control motor 12substantially continuously during operation of the printer.

In the illustrated embodiment of the invention, motor 12 moves theprinthead carriage in an inkjet printer (not shown) across the page tobe printed. Motor 12 operates in three consecutive phases: anacceleration phase in which motor 12 accelerates the printhead from aspeed of zero at one extreme of the printhead range of travel to apredetermined target speed; a constant-speed phase in which it maintainsthe target speed as the printhead moves across the printable area of thepage; and a deceleration phase in which it decelerates the printheadfrom the target speed to a speed of zero at the other extreme of theprinthead range of travel. Although not directly related to the presentinvention, following the deceleration phase, motor 12 reverses directionand moves the printhead carriage in the opposite direction across thepage.

Processing device 10 is suitably programmed or adapted to effect themethod represented by the steps illustrated in FIG. 2. At indicated bystep 20, a first adaptive control method or algorithm is used to controlmotor 12 during the first phase, the acceleration phase, described infurther detail below. As indicated by step 22, after the accelerationphase, when the motor (and thus the printhead carriage that the motormoves) is at the target speed, a second adaptive control method oralgorithm is used to control motor 12 during the second phase, theconstant-speed phase, described in further detail below. As indicated bystep 24, after the constant-speed phase, when the printhead carriage hastraveled a predetermined distance or reached a predetermined point, anadaptive control method or algorithm is used to control motor 12 duringthe third phase, the deceleration phase, described in further detailbelow. The method used in step 24 can be the same as one of the methodsused in steps 20 and 22, i.e., the first and second methods, or can beyet a third method. Generally speaking, any combination of two or moredifferent adaptive control methods can be used in the three phases.

Step 20 of FIG. 2 (the acceleration phase) is illustrated in furtherdetail in FIG. 3. At step 30, the motor speed is read, and at step 32 itis determined whether the motor speed has reached the predeterminedtarget speed. If the motor is at the target speed, then step 20 hascompleted, and the method continues to step 22 as described above.However, if the motor speed has not yet accelerated to the target speed,then at step 34 a look-up table-based method is used to determine how tochange the signal applied to motor 12 to adjust its speed.

Referring briefly to FIG. 4, an acceleration look-up table 40 isillustrated in generalized form, relating motor input power to motorspeed. Look-up table 40 can be created by, for example, empiricalmeasurement-and stored or otherwise included in the logic along with thealgorithms prior to the time that the printer is manufactured. That is,a known amount of power can be applied to motor 12 (or a motoressentially identical to motor 12 but used for gathering the look-uptable data in a laboratory or manufacturing setting rather than in acommercial embodiment of the printer product itself), and the resultingspeed can be measured and recorded along with the corresponding powerthat was applied. This process can be repeated many times, each timeincreasing the power that is applied, until the resulting speed reachesthe target speed. The resulting acceleration curve (a generalizeddepiction of which is shown in FIG. 4) can then be used to power motor12 by having a suitable computer or other controller (not shown) readthe power values in succession and apply them to the motor at apredetermined rate (e.g., via PWM logic or similar motor poweringsystem).

Increasing the speed too rapidly may result in the speed overshootingthe target speed. Therefore, the power values in the table that approachthe value at which the speed is the target speed may need to be adjustedso as to cause the motor to more gradually approach the target speed andnot overshoot it. By optimizing the acceleration curve represented bytable 40 in this manner, the motor can reach the target speed as quicklyas possible without overshooting it. Note that instead of using look-uptable 40, in other embodiments of the invention the adaptive controlmethod could use a mathematical formula substantially equivalent to theacceleration curve represented by table 40. Still other means forproviding such adaptive control logic will occur readily to personsskilled in the art in view of the teachings herein.

Returning to FIG. 3, at step 34 the measured motor speed is used as aninput to look-up table 40, and the corresponding control value, whichrepresents or is indicative of power, is obtained from look-up table 40as an output. At step 36, the control value is applied to motor 12 viaPWM logic 14 (see FIG. 1) as described above. The process repeats,beginning at step 30, until the target speed is reached.

Although in the illustrated embodiment of the invention the adaptivecontrol method used to control motor 12 during the acceleration phase isbased upon use of a look-up table, in other embodiments the method canbe based upon use of a proportional-integral-derivative (PID) method orany other suitable adaptive control method known in the art. Indeed, asdescribed below, a PID adaptive control method or algorithm ispreferably used to control motor 12 during the second phase (theconstant-speed phase), while in the third phase a look-up table-basedmethod is preferably used again.

Step 22 (the constant-speed phase) is illustrated in further detail inFIG. 5. At step 50, the motor speed is read. At step 52 a conventionalPID method is used to determine how to change the signal applied tomotor 12 to adjust its speed. Suitable PID methods are well-known in theart and, indeed, have been conventionally used in printers and the likefor controlling such motors. For purposes of clarity, the PID algorithmitself is not described in detail herein. It is sufficient to note thatthe PID method or algorithm produces a result or control value, which isapplied to motor 12 at step 54 via PWM logic 14 (FIG. 1) as describedabove.

As known in the art, a PID algorithm causes a measured value (in thiscase, motor speed) to move from some initial value toward a setpoint (inthis case, the target speed) and remain at the setpoint by makingessentially continual adjustments to a control value (in this case, themotor power). Thus, the present method can be enhanced at step 53 bystoring the value of motor power that is found to maintain the motor atthe target speed, i.e., the steady-state control value. When step 52 isperformed, if such a value has been previously stored (e.g., if theprinthead carriage had previously traveled across the page), the storedvalue is retrieved and used to initialize the PID method. Step 53 isthus only performed after the motor speed reaches the steady-statetarget speed, and the PID method at step 52 is only initialized once, onthe first iteration, if a stored value exists with which to initializeit.

As known in the art, a PID algorithm can be tuned to enhance itsperformance. Preferably, the PID algorithm used in step 52 is tuned tooptimize its ability to precisely maintain motor 12 at a constant speed.Finally, at step 56, it is determined in the conventional manner whetherthe printhead carriage has traveled a predetermined distance or reacheda predetermined location, indicating that it is to begin deceleration.The process repeats, beginning at step 50, until the deceleration phaseis to begin.

Step 24 of FIG. 2 (the deceleration phase) is illustrated in furtherdetail in FIG. 6. At step 60, the motor speed is read, and at step 62 itis determined whether the motor speed has decelerated to a speed ofzero. If the motor has decelerated to zero, then step 24 has completed,and other printer operations can occur in the conventional manner, suchas reversing the direction of motor 12 for moving the carriage backacross the page. However, if the motor speed has not yet decelerated tozero, then at step 64 a look-up table-based method is used to determinehow to change the signal applied to motor 12 to adjust its speed. Themethod used in step 64 can be essentially identical to the methoddescribed above with regard to step 34 during the acceleration phase(FIG. 3). As illustrated in FIG. 7, a similar look-up table 70 thatlikewise relates power to speed, optimized for deceleration, can beprovided. Alternatively, in other embodiments of the invention, the samelook-up table can be used in steps 34 and 64.

In the above-described exemplary embodiment of the invention, a look-uptable-based adaptive control method is used for and optimized for theacceleration and deceleration phases of motor operation, while a PIDmethod is used for and optimized for a constant-speed phase of operationthat occurs between the acceleration and deceleration phases. Thus,operation in each of the three phases can be optimized withoutcompromising operation in the other phases. In other embodiments of theinvention, the method and system can operate in any number of phasesusing any suitable adaptive control algorithms.

It will be apparent to those skilled in the art that variousmodifications and variations can be made to this invention withoutdeparting from the spirit or scope of the invention. Thus, it isintended that the present invention covers the modifications andvariations of this invention provided that they come within the scope ofany claims and their equivalents. With regard to the claims, no claim isintended to invoke the sixth paragraph of 35 U.S.C. Section 112 unlessit includes the term “means for” followed by a participle.

1. A method for controlling a motor, comprising the steps of:controlling the motor in response to a first adaptive control methodduring a first phase of motor operation; and controlling the motor inresponse to a second adaptive control method during a second phase ofmotor operation.
 2. The method claimed in claim 1, wherein the firstphase is an acceleration phase, and the second phase is a constant-speedphase.
 3. The method claimed in claim 1, wherein the first phase is aconstant-speed phase, and the second phase is a deceleration phase. 4.The method claimed in claim 1, wherein: the first phase is anacceleration phase; the second phase is a constant-speed phase andoccurs after the first phase; and the method further comprises the stepsof: detecting when the motor reaches a target speed during the firstphase; and controlling the motor in response to an adaptive controlmethod other than the second adaptive control method during adeceleration phase of motor operation occurring after the second phase.5. The method claimed in claim 4, wherein the adaptive control methodother than the second adaptive control method is the first adaptivecontrol method.
 6. The method claimed in claim 5, wherein the secondadaptive control method comprises a proportional-integral-derivative(PID) method.
 7. The method claimed in claim 6, further comprising thesteps of: storing a steady-state value produced by the PID method in theconstant-speed phase, the steady-state value remaining stored while themotor operates during a subsequent deceleration phase and subsequentacceleration phase; and initializing a value in the PID method to thestored steady-state value when the motor returns to the constant-speedphase.
 8. The method claimed in claim 6, wherein the first adaptivecontrol method comprises the steps of; measuring motor speed, whereinthe motor is of a type wherein its speed is responsive to its inputpower; obtaining from a look-up table a control value in response to themeasured motor speed, wherein the control value is indicative of motorinput power; and providing an input signal to the motor in response tothe control value.
 9. The method claimed in claim 8, wherein the look-uptable is empirically established from measurements of motor speed inresponse to motor input power.
 10. The method claimed in claim 8,wherein: the control value is obtained from a first lookup table whenthe motor is controlled during the acceleration phase; and the controlvalue is obtained from a second lookup table when the motor iscontrolled during the deceleration phase.
 11. The method claimed inclaim 1, wherein at least one of the first and second adaptive controlmethods comprises the steps of: measuring motor speed; obtaining fromcontrol logic a control value in response to the measured motor speed;and providing an input signal to the motor in response to the controlvalue.
 12. The method claimed in claim 11, wherein the control logiccomprises a look-up table.
 13. The method claimed in claim 12, whereinthe look-up table relates motor speed to motor input power, the motor isof a type wherein its speed is responsive to its input power, and thecontrol value is indicative of motor input power.
 14. The method claimedin claim 13, wherein the look-up table is empirically established frommeasurements of motor speed in response to motor input power.
 15. Amethod for controlling a motor of a type wherein motor speed isresponsive to input power, comprising the steps of: controlling themotor during an acceleration phase of motor operation by the steps of:measuring motor speed, obtaining from a first look-up table a controlvalue in response to the measured motor speed, and providing an inputsignal to the motor in response to the control value, wherein thecontrol value is indicative of motor input power; detecting when themotor reaches a target speed during the acceleration phase; andcontrolling the motor in response to a proportional-integral-derivative(PID) method during a constant-speed phase of motor operation beginningwhen the motor reaches the target speed, wherein the PID method is tunedto optimize constant-speed operation; and controlling the motor during adeceleration phase of motor operation occurring after the constant-speedphase by the steps of: measuring motor speed, obtaining from a secondlook-up table a control value in response to the measured motor speed,and providing an input signal to the motor in response to the controlvalue, wherein the control value is indicative of motor input power. 16.A system for controlling a motor, comprising: a motor speed sensor formeasuring motor speed; a motor power system; first phase adaptivecontrol means for causing the motor power system to produce a firstsignal in response to measured motor speed in accordance with a firstadaptive control method and apply the signal to the motor during a firstphase of motor operation; and second phase adaptive control means forcausing the motor power system to produce a second signal in response tomeasured motor speed in accordance with a second adaptive control methodand apply the signal to the motor during a second phase of motoroperation.
 17. The system claimed in claim 16, wherein the first phaseadaptive control means and first phase adaptive control means areincluded at least partly in a programmed microprocessor.
 18. The systemclaimed in claim 16, wherein the first phase is an acceleration phase,and the second phase is a constant-speed phase.
 19. The system claimedin claim 16, wherein the first phase is a constant-speed phase, and thesecond phase is a deceleration phase.
 20. The system claimed in claim16, wherein at least one of the first phase adaptive control means andsecond phase adaptive control means comprises a look-up table.
 21. Thesystem claimed in claim 16, wherein at least one of the first phaseadaptive control means and second phase adaptive control means comprisesa proportional-integral-derivative (PID)) means for performing aproportional-integral-derivative (PID) method.
 22. A system forcontrolling a motor, comprising: a motor speed sensor for measuringmotor speed; a motor power system; and a processing system programmed oradapted to adaptively control the motor during an first phase of motoroperation by measuring motor speed, obtaining from a first look-up tablea control value in response to the measured motor speed, and causing themotor power system to provide an input signal to the motor in responseto the control value, wherein the control value is indicative of motorinput power, the processing system further programmed or adapted toadaptively control the motor by detecting when the motor reaches atarget speed during the acceleration phase and controlling the motor inresponse to second method during a constant-speed phase of motoroperation beginning when the motor reaches the target speed, theprocessing system further programmed or adapted to adaptively controlthe motor during a deceleration phase of motor operation occurring afterthe constant-speed phase by measuring motor speed, obtaining from asecond look-up table a control value in response to the measured motorspeed, and causing the motor power system to provide an input signal tothe motor in response to the control value, wherein the control value isindicative of motor input power.